package com.ys.timer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;

import com.ys.config.MyConfig;
import com.ys.service.sys.TsFilesInfoService;

@Controller
public class TimerBackupDatebase {
	
    @Autowired
    private TsFilesInfoService tsFilesInfoService;

    /**
     * 备份数据库
     */
	@Scheduled(cron = "0 0 1,12 * * * ")
	public void updateTpAmazonShopOrderDaily() {
		
		
		if (MyConfig.getActive().equals("pro")) {
			tsFilesInfoService.backupDataBase();
		}
	}
	
}
